<#include "/macro.include"/><#include "/java_copyright.include"><#assign className=table.className><#assign classNameLower=className?uncap_first>package ${basepackage};

<#include "/java_imports.include">

public class ${className}VO extends nc.vo.pub.SuperVO {
	private static final long serialVersionUID = 1L;

	<@generateFields/>
	<@generateFieldNames/>
	<@generateProperties/>
	<@generateForSuperVO/>
}
<#macro generateFields>
	<#if table.compositeId>
		// 不支持复合主键
	<#else>
		<#list table.columns as column>
			<#if column.sqlType==1&&column.size==1>
		private nc.vo.pub.lang.UFBoolean ${column.sqlName?lower_case};
	
			<#elseif column.sqlType==1&&column.size==10>
		private nc.vo.pub.lang.UFDate ${column.sqlName?lower_case};
	
			<#elseif column.sqlType==1&&column.size==19>
		private nc.vo.pub.lang.UFDateTime ${column.sqlName?lower_case};
	
			<#else>
		private ${column.javaType} ${column.sqlName?lower_case};
	
			</#if>
		</#list>
	</#if>
</#macro>

<#macro generateFieldNames>
	<#list table.columns as column>
		<#if column.pk>
	public static final String ${column.sqlName?upper_case} = "${column.sqlName?lower_case}";
		<#else>
	public static final String ${column.sqlName?upper_case} = "${column.sqlName?lower_case}";
		</#if>
	</#list>
</#macro>

<#macro generateProperties>
	<#list table.columns as column>
		<#if column.isDateTimeColumn>
	public Date get${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}() {
		return DateConvertUtils.parse(get${column.columnName}());
	}
	public void set${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}(Date value) {
		set${column.columnName}(DateConvertUtils.parse(value,FORMAT_${column.constantName},${column.javaType}.class));
	}

		<#elseif column.sqlType==1&&column.size==1>
	public nc.vo.pub.lang.UFBoolean get${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}() {
		return this.${column.sqlName?lower_case};
	}

	public void set${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}(nc.vo.pub.lang.UFBoolean value) {
		this.${column.sqlName?lower_case} = value;
	}

		<#elseif column.sqlType==1&&column.size==10>
	public nc.vo.pub.lang.UFDate get${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}() {
		return this.${column.sqlName?lower_case};
	}

	public void set${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}(nc.vo.pub.lang.UFDate value) {
		this.${column.sqlName?lower_case} = value;
	}

		<#elseif column.sqlType==1&&column.size==19>
	public nc.vo.pub.lang.UFDateTime get${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}() {
		return this.${column.sqlName?lower_case};
	}

	public void set${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}(nc.vo.pub.lang.UFDateTime value) {
		this.${column.sqlName?lower_case} = value;
	}

		<#else>
	public ${column.javaType} get${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}() {
		return this.${column.sqlName?lower_case};
	}

	public void set${column.sqlName?substring(0,1)?upper_case}${column.sqlName?lower_case?substring(1)}(${column.javaType} value) {
		this.${column.sqlName?lower_case} = value;
	}

		</#if>
	</#list>
</#macro>

<#macro generateForSuperVO>
	@Override
	public String getParentPKFieldName() {
		return ${parentpk_in_child};
	}

	@Override
	public String getPKFieldName() {
	<#list table.columns as column>
		<#if column.pk>
		return "${column.getUnderscoreName()}";
		</#if>
	</#list>
	}

	@Override
	public String getTableName() {
		return "${table.sqlName}";
	}
</#macro>